package service

import (
	"lktx-dns/bean"
	"lktx-dns/config"
	"strings"
)

type UserService struct {
}

func (receiver *UserService) Login(login bean.ReqLogin) *bean.ResLoginUser {
	if strings.Compare(config.ConfigData.Admin.Username, login.Email) == 0 && strings.Compare(config.ConfigData.Admin.Password, login.Password) == 0 {
		return bean.NewAdminUser(login)
	}
	return nil
}
